A Language-based Approach to Unifying Events and Threads
نویسندگان
چکیده
This paper presents a language-based technique to unify two seemingly opposite programming models for building massively concurrent network services: the eventdriven model and the multithreaded model. The result is a unified concurrency model providing both thread abstractions and event abstractions. Using this model, each component in an application can be implemented using the appropriate abstraction, simplifying the design of complex, multithreaded systems software. This paper shows how to implement the unified concurrency model in Haskell, a pure, lazy, functional programming language. It also demonstrates how to use these techniques to build an application-level thread library with support for multiprocessing and asynchronous I/O mechanisms in Linux. The thread library is typesafe, is relatively simple to implement, and has good performance. Application-level threads are extremely lightweight (scaling to ten million threads) and our scheduler, which is implemented as a modular and extensible event-driven system, outperforms NPTL in I/O benchmarks.
منابع مشابه
Scala actors : Unifying thread - based and event - based programming Philipp
There is an impedance mismatch between message-passing concurrency and virtual machines, such as the JVM. VMs usually map their threads to heavyweight OS processes. Without a lightweight process abstraction, users are often forced to write parts of concurrent applications in an event-driven style which obscures control flow, and increases the burden on the programmer. In this paper we show how ...
متن کاملThe Origin and Limitations of Modern Mathematical Economics: A Historical Approach
We have first demonstrated that Debreu’s view regarding the publication of The Theory of Games and Economic Behavior by von Neumann and Morgenstern in 1944 as the birth of modern mathematical economics is not convincing. In this paper, we have proposed the hypothesis that the coordinated research programs in the 1930’s, initiated by the Econometric Society and the Cowles Commission for Research...
متن کاملAutomatic Generation of a Multi Agent System for Crisis Management by a Model Driven Approach
Considering the increasing occurrences of unexpected events and the need for pre-crisis planning in order to reduce risks and losses, modeling instant response environments is needed more than ever. Modeling may lead to more careful planning for crisis-response operations, such as team formation, task assignment, and doing the task by teams. A common challenge in this way is that the model shou...
متن کاملLanguage Learning Strategies: A Strategy-Based Approach to L2 Learning.Strategic Competence, and Test Validation
متن کامل
Applied Linguistic Approach to Language Learning Strategies (A Critical Review)
From applied linguistic point of view, the fundamental question facing the language teachers, methodologists and course designers is which procedure is more effective in FL/SL: learning to use or using to learn? Definitely, in order to be a competent language user, knowledge of language system is necessary, but it is not sufficient to be a successful language user. That is why there was a gradu...
متن کامل